import request from '@/utils/request'

// 查询销售出库列表
export function listStoreout(query) {
  return request({
    url: '/sale/storeout/list',
    method: 'get',
    params: query
  })
}

// 查询销售出库详细
export function getStoreout(id) {
  return request({
    url: '/sale/storeout/' + id,
    method: 'get'
  })
}
// 根据客户id查询已经出库的出库单
export function getStoreoutByCustomerId(id) {
  return request({
    url: '/sale/storeout/getStoreoutByCustomerId/' + id,
    method: 'get'
  })
}

// 新增销售出库
export function addStoreout(data) {
  return request({
    url: '/sale/storeout',
    method: 'post',
    data: data
  })
}

// 修改销售出库
export function updateStoreout(data) {
  return request({
    url: '/sale/storeout',
    method: 'put',
    data: data
  })
}

// 删除销售出库
export function delStoreout(id) {
  return request({
    url: '/sale/storeout/' + id,
    method: 'delete'
  })
}
